<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <button id="btnSendFetch">Send fetch request</button>
    <span>Request status:</span><span id="requestStatusText">Not send</span>
    <script>
        const btnSendFetch = document.getElementById('btnSendFetch');

        btnSendFetch.addEventListener('click', function () {
            fetch('http://dummy-url.com/get')
                .then(res => {
                    document.getElementById('requestStatusText').textContent = 'Sent';
                })
                .catch(() => {
                    document.getElementById('requestStatusText').textContent = 'CORS failed';
                });
        });
    </script>
</body>
</html>
